/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.laas.jt;

/**
 *
 * @author ernestoexposito
 */
public class Singleton {

    private static Singleton singleton=null;
    private int value;

    private Singleton()
    {
        value=0;
    }

    public void setValue(int v)
    {
        this.value = v;
    }

    public int getValue()
    {
        return value;
    }

    public static Singleton getInstance()
    {
        if (singleton==null)
            singleton=new Singleton();
        return singleton;
    }

}
